import axiosInstance from '@/tools/request'
import type { WorkTravelPay } from '@/api/work/workTravelPay.d' // 这里时你将 work_travel_pay.d.ts 存放的位置

//workTravelPayAdd 工作出差支付添加
export const workTravelPayAdd = (workTravelPay: WorkTravelPay) => {
  return axiosInstance({
    url: `/workTravelPay`,
    method: 'post',
    data: workTravelPay
  })
}

//workTravelPayRemove 工作出差支付删除
export const workTravelPayRemove = (workTravelPayId: number) => {
  return axiosInstance({
    url: `/workTravelPay/${ workTravelPayId }`,
    method: 'delete'
  })
}

//workTravelPayModify 工作出差支付修改
export const workTravelPayModify = (workTravelPay: WorkTravelPay) => {
  return axiosInstance({
    url: `/workTravelPay`,
    method: 'put',
    data: workTravelPay
  })
}

//workTravelPayList 工作出差支付列表
export const workTravelPayList = (workTravelPay:WorkTravelPay, params: any) => {
  return axiosInstance({
    url: '/workTravelPay/list',
    method: 'post',
    params: params,
    data: workTravelPay
  })
}

//workTravelPayById 工作出差支付查询通过ID
export const workTravelPayById = (workTravelPayId: number) => {
  return axiosInstance({
    url: `/workTravelPay/${ workTravelPayId }`,
    method: 'get'
  })
}


//workTravelPayRemoveBatch 工作出差支付批量删除
export const workTravelPayRemoveBatch = (ids: any[]) => {
  return axiosInstance({
    url: `/workTravelPay/batchDelete`,
    method: 'delete',
    params: {
      ids:ids
    }
  })
}

